Style Layers

  • A map style’s background layer is the bottommost layer and is used to style a color or pattern to show below all other map features. You can query an MGLMapView for its style and obtain the background layer using the -[MGLStyle layerWithIdentifier:] method and passing background for the identifier.

    See more

    Declaration

    Objective-C

    @interface MGLBackgroundStyleLayer : MGLStyleLayer

    Swift

    class MGLBackgroundStyleLayer : MGLStyleLayer
  • A circle layer which allows customization of styling properties at runtime. You may instantiate a new circle layer to add to a map style or you may query an MGLMapView for its style and obtain existing layers using the -[MGLStyle layerWithIdentifier:] method.

    See more

    Declaration

    Objective-C

    @interface MGLCircleStyleLayer : MGLVectorStyleLayer

    Swift

    class MGLCircleStyleLayer : MGLVectorStyleLayer
  • A fill layer which allows customization of styling properties at runtime. You may instantiate a new fill layer to add to a map style or you may query an MGLMapView for its style and obtain existing layers using the -[MGLStyle layerWithIdentifier:] method.

    See more

    Declaration

    Objective-C

    @interface MGLFillStyleLayer : MGLVectorStyleLayer

    Swift

    class MGLFillStyleLayer : MGLVectorStyleLayer
  • A line layer which allows customization of styling properties at runtime. You may instantiate a new line layer to add to a map style or you may query an MGLMapView for its style and obtain existing layers using the -[MGLStyle layerWithIdentifier:] method.

    See more

    Declaration

    Objective-C

    @interface MGLLineStyleLayer : MGLVectorStyleLayer

    Swift

    class MGLLineStyleLayer : MGLVectorStyleLayer
  • A raster layer which allows customization of styling properties at runtime. You may instantiate a new raster layer to add to a map style or you may query an MGLMapView for its style and obtain existing layers using the -[MGLStyle layerWithIdentifier:] method.

    See more

    Declaration

    Objective-C

    @interface MGLRasterStyleLayer : MGLForegroundStyleLayer

    Swift

    class MGLRasterStyleLayer : MGLForegroundStyleLayer
  • MGLStyleLayer is an abstract base class for style layers. A style layer manages the layout and appearance of content at a specific z-index in a style. An MGLStyle object consists of one or more MGLStyleLayer objects.

    Each style layer defined by the style JSON file is represented at runtime by an MGLStyleLayer object, which you can use to refine the map’s appearance. You can also add and remove style layers dynamically.

    Do not create instances of this class directly, and do not create your own subclasses of this class. Instead, create instances of MGLBackgroundStyleLayer and the concrete subclasses of MGLForegroundStyleLayer.

    See more

    Declaration

    Objective-C

    @interface MGLStyleLayer : NSObject

    Swift

    class MGLStyleLayer : NSObject
  • A symbol layer which allows customization of styling properties at runtime. You may instantiate a new symbol layer to add to a map style or you may query an MGLMapView for its style and obtain existing layers using the -[MGLStyle layerWithIdentifier:] method.

    See more

    Declaration

    Objective-C

    @interface MGLSymbolStyleLayer : MGLVectorStyleLayer

    Swift

    class MGLSymbolStyleLayer : MGLVectorStyleLayer